const getters = {
  token: (state) => state.user.token,
  avatar: (state) => state.user.avatar,
  name: (state) => state.user.name,
  roles: (state) => () => {
    return state.user.roles;
  },
  buttons: (state) => state.user.buttons,
  allButtons: (state) => state.user.allButtons,
  admintype: (state) => state.user.admintype,
  userInfo: (state) => state.user.info,

  barColor: (state) => state.app.barColor,
  isOpenBread: (state) => state.app.isOpenBread, // 是否开启面包屑导航

  addRouters: (state) => () => {
    return state.permission.addRouters;
  },
};

export default getters;
